import { ref, onMounted } from "vue"

let width = ref(0)
let height = ref(0)
let dom
export function useScreen(id) {
  onMounted(() => {
    dom = document.getElementById(id)
    width.value = dom.clientWidth
    height.value = dom.clientHeight
  })
  return {
    width,
    height
  }
}
